package project.newCode;
import project.hulpPakket.*;
import project.newCode.materials.Material;

// Implementation is partially postponed untill necessary
public class Hitrecord {
	public float t;
	public Point3f intersection;
	public Material material;
	// This value should allways be normalized!
	public Vector3f normal;
	public Color3f cr;
	public Color3f cs;
	public int hitCounter;
	public Hitrecord() {
		this.t=Float.MAX_VALUE;
	}
	public Hitrecord(int cnt) {
		this.t=Float.MAX_VALUE;
		hitCounter = cnt;
	}
	public Hitrecord(float t, Point3f intersection, Vector3f normal,
			Color3f cr, Color3f cs, float phongexp, TexCoord2f tex) {
		super();
		this.t = t;
		this.intersection = intersection;
		this.normal = normal;
		this.cr = cr;
		this.cs = cs;
		this.phongexp = phongexp;
		this.tex = tex;
	}
	public float phongexp;
	public TexCoord2f tex;
	public Hitrecord duplicate() {
		Hitrecord h = new Hitrecord(t,intersection,normal,cr,cs,phongexp,tex);
		return h;
	}
	public void copyInto(Hitrecord rec) {
		rec.t = t;
		rec.intersection = intersection;
		rec.normal = normal;
		rec.cr = cr;
		rec.cs = cs;
		rec.phongexp = phongexp;
		rec.tex = tex;
		rec.material = material;
		rec.hitCounter = hitCounter;
	}
}
